package com.mb.ext.core.entity.group;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.NamedQuery;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.mb.ext.core.entity.merchant.MerchantEntity;
import com.mb.framework.entity.AbstractBaseEntity;

/**
 * 秒杀商品表
 * 
 */
@Entity
@Table(name = "group_buy_def_merchant")
@NamedQuery(name = "GroupBuyDefMerchantEntity.findAll", query = "SELECT u FROM GroupBuyDefMerchantEntity u")
public class GroupBuyDefMerchantEntity extends AbstractBaseEntity
{

	private static final long serialVersionUID = 2233062138920658290L;

	@Id
	@GeneratedValue(generator = "GROUP_BUY_DEF_MERCHANT_UUID")
	@GenericGenerator(name = "GROUP_BUY_DEF_MERCHANT_UUID", strategy = "uuid")
	@Column(name = "GROUP_BUY_DEF_MERCHANT_UUID", nullable = false, length = 36)
	private String groupBuyDefMerchantUuid;

	//团长
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "MERCHANT_UUID")
	private MerchantEntity merchantEntity;
	
	public String getGroupBuyDefMerchantUuid() {
		return groupBuyDefMerchantUuid;
	}

	public void setGroupBuyDefMerchantUuid(String groupBuyDefMerchantUuid) {
		this.groupBuyDefMerchantUuid = groupBuyDefMerchantUuid;
	}

	public MerchantEntity getMerchantEntity() {
		return merchantEntity;
	}

	public void setMerchantEntity(MerchantEntity merchantEntity) {
		this.merchantEntity = merchantEntity;
	}

	public GroupBuyDefEntity getGroupBuyDefEntity() {
		return groupBuyDefEntity;
	}

	public void setGroupBuyDefEntity(GroupBuyDefEntity groupBuyDefEntity) {
		this.groupBuyDefEntity = groupBuyDefEntity;
	}

	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "GROUP_BUY_DEF_UUID")
	private GroupBuyDefEntity groupBuyDefEntity;
	
}